package com.corpcredit.dao;

import com.corpcredit.model.Jbqk;
import com.corpcredit.model.Role;

import java.util.List;

/**
 * Lookup Data Access Object (GenericDao) interface.  This is used to lookup values in
 * the database (i.e. for drop-downs).
 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 */
public interface LookupDao extends UniversalDao {
    //~ Methods ================================================================

    /**
     * Returns all Roles ordered by name
     * @return populated list of roles
     */
    List<Role> getRoles();
    
    /**
     * Generic method used to get all objects of a particular type accordint to JbqkID.
     * @param object the object type to retrieve
     * @param jbqkID ID of Jbqk
     * @return List of populated objects
     */
    List findAllByJbqkID(Class clazz, Long jbqkID);
    
    /**
     * Get an object based on class and Jbqk ID. This object has an one-to-one relationship with Jbqk.
     * @param object the object to retrieve
     * @param jbqkID ID of Jbqk
     * @return a populated object
     */
    Object findByJbqkID(Class clazz, Long jbqkID);
    Object findByRyid(String clazz,String ryid);
    List findGlryCwfzrByJqbkID(Long jbqkID);
    public List<Jbqk> findJbqks( String qyqc, String yyzzzch, String ssqy, Long hyflID );
}
